﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Account.aspx.cs" Inherits="Account" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .leftCol { display: none }
        .main { float: none; width: 960px; }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#panelbar").kendoPanelBar();
        });
    </script>

    <script src="<%=ResolveClientUrl("~/Resource/js/benik.js")%>" type="text/javascript"></script>

    <script type="text/javascript" language="javascript">
        $(document).ready(function () {

            $('#btnSave').click(function () {
//                if (!$("#form1").valid())
//                    return;

                var name = $('#<%=txtFullname.ClientID %>').val();
                var password = $('#PassCode').val();
                var password_new = $('#PassCode_new').val();
                var password_retype = $('#PassCode_retype').val();
                
                var objUser = new Object();
                //objUser.UserID = id;
                objUser.Name = encodeURIComponent(name);
                objUser.Password = encodeURIComponent(password);
                objUser.PasswordNew = encodeURIComponent(password_new);
                objUser.PasswordRetype = encodeURIComponent(password_retype);
                jsonData = JSON.stringify(objUser);

                //if (id == 0)
                //    CallAjax('<%= ResolveUrl("~/handler/sysUserHandler.ashx") %>', "?show=create", jsonData);
                //else
                    CallAjax('<%= ResolveUrl("~/handler/sysUserHandler.ashx") %>', "?show=updateprofile", jsonData);

                //parent.$('#dialog').dialog('close');
                //parent.location.reload();
                //setTimeout(parent.$('#user-grid').data('kendoGrid').dataSource.read(), 3000);
                //setTimeout(parent.$('#user-grid').data('kendoGrid').refresh(), 3000);
                return false;
            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
    <img id="Img1" src="~/Resource/Img/account.png" runat="server" alt="My Account" />My Account
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    <div id="detail-result" style="display: block">
        <div class="dashboard-detail-left">
            <table width="100%" id="candidate-detail">
                <tr>
                    <td width="100"><label>Nama Lengkap</label></td>
                    <td width="10" align="center">:</td>
                    <td><asp:Label ID="Fullname" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <td><label>E-mail</label></td>
                    <td align="center">:</td>
                    <td><asp:Label ID="EmailAddress" runat="server"></asp:Label></td>
                </tr>
                <%--<tr>
                    <td><label>Cabang</label></td>
                    <td align="center">:</td>
                    <td><asp:Label ID="BranchID" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <td><label>Group</label></td>
                    <td align="center">:</td>
                    <td><asp:Label ID="GroupID" runat="server"></asp:Label></td>
                </tr>--%>
            </table>
        </div>
        <div class="dashboard-detail-right">
            <asp:Label ID="InfoSubmit" runat="server" Font-Bold="true" Font-Size="Medium"></asp:Label>
            <ul id="panelbar">
                <li class="k-state-active">
                    <span class="k-link k-state-selected"><b>Ubah Data Profil</b></span>
                    <div class="forminput">
                        <table width="100%" style="background: #FFF; padding: 10px">
                            <tr>
                                <td width="120"><label>Nama Lengkap</label></td>
                                <td><input type="text" class="required" id="txtFullname" runat="server" name="Fullname" size="40" /></td>
                            </tr>
                            <%--<tr>
                                <td width="120"><label>E-mail</label></td>
                                <td><input type="text" class="required" id="txtEmailAddress" runat="server" name="EmailAddress" size="40" /></td>
                            </tr>--%>
                        </table>
                    </div>
                </li>
                <li>
                    <span><b>Ganti Password</b></span>
                    <div class="forminput">
                        <table width="100%" style="background: #FFF; padding: 10px">
                            <tr>
                                <td width="120"><label>Password Anda</label></td>
                                <td><input type="password" name="PassCode" id="PassCode" size="30" /></td>
                            </tr>
                        </table>
                        <hr />
                        <table width="100%" style="background: #FFF; padding: 10px">
                            <tr>
                                <td width="120"><label>Password Baru</label></td>
                                <td><input type="password" name="PassCode_new" id="PassCode_new" size="30" /></td>
                            </tr>
                            <tr>
                                <td><label>Ketik Ulang Password Baru</label></td>
                                <td><input type="password" name="PassCode_retype" id="PassCode_retype" size="30" /></td>
                            </tr>
                        </table>
                    </div>
                </li>
            </ul>
           <button id="btnSave" type="button">
                        Save</button>
        </div>
    </div>
</asp:Content>
